<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        class Car {
            constructor(name, year, price) {
                this.name = name;
                this.year = year;
                this.price = price;
            }
            // 加static等于在原型上加属性，不加static是在实例上加属性
            static wheel = 4
        }

        const c1 = new Car('Ford', 2014, 20000);
        console.log(c1);
        console.log(c1.wheel);
        console.log(Car.wheel);
    </script>
</body>

</html>